package com.example.libraryapp.activity.bookDetail;

import com.example.libraryapp.bean.Book;
import com.example.libraryapp.bean.BookDetail;
import com.example.libraryapp.bean.response.BaseResponse;
import com.example.libraryapp.network.base.IBaseView;

/**
 * @author 伍凯铭
 * @since 2020/6/23
 */
public interface BookDetailContract {

    interface View extends IBaseView {
        void showBook(BaseResponse<BookDetail> response);

        void addFavorite(BaseResponse response);

        void deleteFavorite(BaseResponse response);

        void handleError(String error);

        void handleBorrow(BaseResponse response);

        void handleReturn(BaseResponse response);
    }

    interface Presenter {
        void getBookDetail(long bookId,long userId);

        void addFavorite(long userId, long bookId);

        void deleteFavorite(long userId, long bookId);

        void borrowBook(long userId, long bookId);

        void returnBook(long userId, long bookId);
    }
}
